package com.hunktimes.exam.entity;

import java.math.BigDecimal;

/**
 * 订单
 */
public class Order {
    /**
     * 商品名称
     */
    private String goodsName;
    /**
     * 商品价格
     */
    private BigDecimal price;
    /**
     * 商品数量(斤)
     */
    private Integer num;


    public Order() {
    }

    public Order(String goodsName, BigDecimal price, Integer num) {
        this.goodsName = goodsName;
        this.price = price;
        this.num = num;
    }

    public Order(Goods goods, Integer num) {
        this(goods.getName(), goods.getPrice(), num);
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }
}
